using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using PhongKham.Class;

namespace PhongKham.View
{
    public partial class FrmDonviTinh : PhongKham.FrmTemplate
    {
        private DataSet dsDvitinh = new DataSet();
        PhongKham.Controller.DonviTinhController control = new PhongKham.Controller.DonviTinhController();

        public FrmDonviTinh()
        {
            InitializeComponent();           
            DisplayInfo();
        }

        private void DisplayInfo()
        {
            dsDvitinh = control.GetAll();
            gvDonvitinh.DataSource = dsDvitinh.Tables[0];
            gridView1.BestFitColumns();
        }

        public override void PerformSave()
        {
            control.UpdateDvitinh(dsDvitinh.Tables[0]);
        }

        public override void PerformRefresh()
        {
            DisplayInfo();
        }

        private void tblLayoutDvt_Paint(object sender, PaintEventArgs e)
        {

        }

     
    }
}